<template>
  <div>
    <BasicTable @register="registerTable" :searchInfo="searchInfo"></BasicTable>
  </div>
</template>
<script lang="ts" setup name="userOptLog">
import { BasicTable } from '@apps/antd-admin/src/components/Table';
import { Api } from './api';
import { columns, searchFormSchema } from './data';
import { useMessage } from '@apps/antd-admin/src/hooks/web/useMessage';
import { reactive } from 'vue';
import { useBaseTable } from '@apps/antd-admin/src/hooks';

const { createMessage } = useMessage();

const { prefixCls, tableContext, handleDelete, handleSuccess, handlePost, handleBatchDelete } = useBaseTable({
  designScope: 'userOptLog-template',
  tableProps: {
    //表格标题
    title: '操作日志列表',
    //列表接口
    listUrl: Api.page,
    handlerName: 'appUserOptLogHandler',
    //列定义
    columns: columns,
    //查询表单配置
    formConfig: {
      labelWidth: 120,
      schemas: searchFormSchema,
    },
    showActionColumn: false,
  },
});
const [registerTable, { getForm, setProps, reload }, { rowSelection, hasSelectedRows, selectedRow }] = tableContext;
const searchInfo = reactive<Recordable>({});

function setSearchInfoProps(busType, businessId) {
  searchInfo.busType = busType;
  searchInfo.businessId = businessId;
}

defineExpose({
  setSearchInfoProps,
});
</script>
